﻿Imports MySQL
Imports MySQLCommand
Imports System.Data.SqlClient
Imports System.Configuration

Public Class Form1
    Sub Connect()
        clsSQL.setConnection(ConfigurationSettings.AppSettings("connect"))
        If clsSQL.Connected() = False Then
            MsgBox("Lỗi kết nối")
            'MsgBox("Kết nối thành công")
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Connect()
        dsCongty.Tables("sp_Congty_SelectByMaCty").Clear()
        clsSQL.FillDataSet("sp_Congty_SelectByMaCty", DsCongty, "sp_Congty_SelectByMaCty", 0, 0)
        Dim user As String = ""

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        MsgBox(ComboBox1.SelectedValue)
    End Sub
End Class
